

function init(){
	document.cachePage = false;
	var passwordA = document.getElementById('passwordA');
	passwordA.onfocus = focusInput;
	passwordA.onblur = blurInput;
	passwordA.onclick = blurClick;
	passwordA.setAttribute('val','');
	
	var btnA = document.getElementById('btnA');
	btnA.onfocus = focusBtn;
	btnA.onblur = blurBtn;
	btnA.onclick = clickBtn;
	
	document.focus('passwordA');
}


KEY.KEY_RETURN = function (){
	history.go(-1);
	return false;
}

function focusInput(event){
	var a = event.currentTarget;
	var par = a.parentNode;
	par.className = 'curInput';
	KEY.CURTYPE = 'numberInput';
}

function blurInput(event){
	var a = event.currentTarget;
	var par = a.parentNode;
	par.className = 'input';
	KEY.CURTYPE = '';
}
function blurClick(event){
	clickBtn();
}
function focusBtn(event){
	var a = event.currentTarget;
	var par = a.parentNode;
	par.className = 'curBtn';
}

function blurBtn(event){
	var a = event.currentTarget;
	var par = a.parentNode;
	par.className = 'btn';
}

function clickBtn(event){
	var passwordA = document.getElementById('passwordA');
	var val = passwordA.getAttribute('val');
	if(val == config.password){
		gotoPage();
	}else{
		showGTip('Please input correct password',5);
	}
}

KEY.TYPE['numberInput'].keyReturn = function(){
	KEY.KEY_RETURN();
}
function gotoPage(){
	$.gotoPage('file:///usr/data/pages/webhotel/setting/server/index.html');
}